package com.changli07._interface.exer3;

public class VehicleTest {
    public static void main(String[] args) {
        Vehicle [] vehicles = new Vehicle[3];
        vehicles[0] = new Bicycle("123","red");
        vehicles[1] = new Car("X80","blue","X399");
        vehicles[2] = new ElectricVehicle("sail","pink");
        Develop develop = new Develop();
        for (int i = 0; i < vehicles.length; i++) {
            develop.takingVehicle(vehicles[i]);
            if(vehicles[i] instanceof IPower){
                ((IPower)vehicles[i]).power();
            }

        }
    }
}
